﻿
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="/CSS/bootstrap3.3.5/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jquery-1.11.2.min.js" type="text/javascript"></script>

    <script src="/CSS/bootstrap3.3.5/js/bootstrap.js"></script>
    <script src="/Scripts/avalon.js"></script>
    <script src="/Scripts/jquery-migrate-1.1.0.min.js"></script>
    <script src="/JqueryPlug/dtGrid/jquery.dtGrid.js"></script>
    <script src="/Scripts/SZHLCommon.js?jsver=5"></script>
    <script src="/Scripts/city.js"></script>
    <!--[if IE]>
        <script src="../../Scripts/HTML5.js"></script>
    <![endif]-->
    <style type="text/css">
        .szhl_Upload {
            display: none;
        }

        .middle {
            line-height: 30px;
            vertical-align: middle;
            float: left;
            display: inline;
        }
    </style>
    <script type="text/javascript">

        var model = avalon.define({
            $id: "WXQyhInfo",
            CompanyData: {},
            CompanyEdit: function () {
                var modelValue = JSON.stringify(model.CompanyData.$model);
                $.post("/API/SZHLAPI.ashx", { Action: "EDITCOMPANYQYH", P1: modelValue },
                function (result) {
                    if ($.trim(result.ErrorMsg) != "") {
                        parent.ComFunJS.winwarning(result.ErrorMsg);
                    } else {
                        parent.ComFunJS.winsuccess("保存成功");
                    }
                });
            },
        });

        avalon.ready(function () {
            //获取企业号信息
            $.getJSON('/API/SZHLAPI.ashx?Action=GETCOMPANYINFO', function (resultData) {
                model.CompanyData = resultData.Result;
            })
        })

    </script>
</head>
<body ms-controller="WXQyhInfo">
    <div class="container-fluid maindiv" style="margin:20px">
        <div class="panel panel-default">
            <div class="panel-heading">企业配置</div>
            <div class="panel-body">
                <div class="form-horizontal" style="margin:20px  auto auto 50px; ">
                    <div class="form-group">
                        <label class="col-xs-3 control-label"><span class="Required">*</span>微信企业号绑定URL（WXUrl）</label>
                        <div class="col-xs-4">
                            <input type="text" ms-duplex="CompanyData.WXUrl" class="form-control " placeholder="微信企业号绑定URL" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label"><span class="Required">*</span>微信企业号corpId</label>
                        <div class="col-xs-4">
                            <input type="text" ms-duplex="CompanyData.corpId" class=" form-control " placeholder="微信企业号corpId" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label"><span class="Required">*</span>微信企业号corpSecret</label>
                        <div class="col-xs-4">
                            <input type="text" ms-duplex="CompanyData['corpSecret']" class="form-control" placeholder="微信企业号corpSecret" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label"><span class="Required">*</span>微信企业号会话Token</label>
                        <div class="col-xs-4">
                            <input type="text" ms-duplex="CompanyData.Token" class=" form-control " placeholder="微信企业号会话Token" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label"><span class="Required">*</span>微信企业号会话EncodingAESKey</label>
                        <div class="col-xs-4">
                            <input type="text" ms-duplex="CompanyData['EncodingAESKey']" class="form-control" placeholder="微信企业号会话EncodingAESKey" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label"><span class="Required">*</span>是否启用企业号(isUseWX)</label>
                        <div class="col-xs-8">
                            <select class="form-control" ms-duplex="CompanyData.IsUseWX" style="width:100px">
                                <option value="Y" ms-attr-selected="CompanyData.IsUseWX=='Y'?'selected':''">是</option>
                                <option value="N" ms-attr-selected="CompanyData.IsUseWX=='N'?'selected':''">否</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-3 control-label"><span class="Required">*</span>系统公告应用ID</label>
                        <div class="col-xs-4">
                            <input type="text" ms-duplex="CompanyData['SystemGGId']" class="form-control" placeholder="系统公告应用ID" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label"><span class="Required">*</span>个人消息应用ID</label>
                        <div class="col-xs-4">
                            <input type="text" ms-duplex="CompanyData['MsgAppID']" class="form-control" placeholder="个人消息应用ID" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label"><span class="Required">*</span>文件服务器URL</label>
                        <div class="col-xs-4">
                            <input type="text" ms-duplex="CompanyData['FileServerUrl']" class="form-control" placeholder="文件服务器" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label"><span class="Required">*</span>上传文件Code</label>
                        <div class="col-xs-4">
                            <input type="text" ms-duplex="CompanyData['QYCode']" class="form-control" placeholder="文件夹名称，大写" />
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class=" col-xs-8   text-center">
                        <input type="button" value="保 存" ms-click="CompanyEdit()" class="btn btn-success btn-lg" width="180px" />

                    </div>
                </div>
            </div>

        </div>
        
    </div>
</body>
</html>
